package com.frogs.ucenter.dao.ibatis;

import java.util.List;
import java.util.Map;

import com.frogs.framework.base.dao.ibatis.BaseDaoIbatis;
import com.frogs.ucenter.dao.TagUserRelationTemporaryDao;
import com.frogs.ucenter.entity.TagUserRelationTemporary;
import com.ibatis.sqlmap.client.SqlMapClient;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Repository;

@Repository("tagUserRelationTemporaryDao")
public class TagUserRelationTemporaryDaoImpl extends BaseDaoIbatis<TagUserRelationTemporary> implements TagUserRelationTemporaryDao {

    public TagUserRelationTemporaryDaoImpl() {
        super();
        setNameSpace( "tag_user_relation_temporary" );
    }

    @Required
    @Resource
    public void setSqlMapClientAutowired(SqlMapClient sqlMapClient) {
        super.setSqlMapClient( sqlMapClient );
    }

	@Override
	public List<Map<String, Object>> listFollowedTags(Map<String, Object> params) {
		try {
			return getSqlMapClient().queryForList(getNameSpace() + ".selectTagsByUserId", params);
		} catch (Exception e) {
			return null;
		}
	}
}